<style>

#account-info {
	width: auto;
	line-height: 30px;
}
#account-info input {
	padding: 5px;
}
#account-info caption {
	font-weight: bold;
	background-color: #fff;
}
#account-info th {
	text-align: right;
	font-weight: normal;
	width: 150px;
}
.errorMessage {
	color: red;
}
</style>

<div class="block">
	<div class="block-title">
	<?php
	$title = array('password' => 'Modify Password', 'basic' => 'Modify Basic Info', 'payment' => 'Modify Payment Details');
	echo $title[$fields]; 
	?>
	</div>
	<div class="block-body" style="padding-top: 5px;">
	
		<?php $form=$this->beginWidget('CActiveForm', array(
		    'id'=>'owner-form',
		    'enableAjaxValidation'=>true,
		)); ?>
		
		<table id="account-info">
			<tbody>
			<?php if ($fields == 'password'):?>
				<tr>
					<th><strong>Login Details:</strong></th>
					<td></td>
				</tr>
				<tr>
					<th>Affiliate:</th>
					<td><?php echo $model->loginid ?></td>
				</tr>
				<tr>
					<th>Password:</th>
					<td><input type="password" id="Owner_passwd" name="Owner[passwd]" value="" maxlength="50" size="20"></td>
					<td><?php echo $form->error($model,'passwd'); ?></td>
				</tr>
				<tr>
					<th>Repeat Password:</th>
					<td><input type="password" id="Owner_passwd" name="Owner[passwd2]" value="" maxlength="50" size="20"></td>
					<td><?php echo $form->error($model,'passwd2'); ?></td>
				</tr>
			
			<?php elseif ($fields == 'basic'):?>	
				<tr>
					<th><strong><br />Basic Information:</strong></th>
					<td></td>
				</tr>
				<tr>
					<th>First Name:</th>
					<td><?php echo $form->textField($model,'firstname',array('size'=>30,'maxlength'=>50)); ?></td>
					<td><?php echo $form->error($model,'firstname'); ?></td>
				</tr>
				<tr>
					<th>Last name:</th>
					<td><?php echo $form->textField($model,'lastname',array('size'=>30,'maxlength'=>50)); ?></td>
					<td><?php echo $form->error($model,'lastname'); ?></td>
				</tr>
				<tr>
					<th>Email:</th>
					<td><?php echo $form->textField($model,'email',array('size'=>30,'maxlength'=>60)); ?></td>
					<td><?php echo $form->error($model,'email'); ?></td>
				</tr>
				<tr>
					<th>URL:</th>
					<td><?php echo $form->textField($model,'site',array('size'=>30,'maxlength'=>60)); ?></td>
					<td><?php echo $form->error($model,'site'); ?></td>
				</tr>
				<tr>
					<th>Phone No.:</th>
					<td><?php echo $form->textField($model,'telephone',array('size'=>30,'maxlength'=>60)); ?></td>
					<td><?php echo $form->error($model,'telephone'); ?></td>
				</tr>
				
			<?php elseif ($fields == 'payment'):?>	
			
				<tr>
					<th><strong><br />Payment Details:</strong></th>
					<td></td>
				</tr>
				<tr>
					<th>Checks Payable to:</th>
					<td><?php echo $form->textField($model,'payableto',array('size'=>30,'maxlength'=>60)); ?></td>
					<td><?php echo $form->error($model,'payableto'); ?></td>
				</tr>
				<tr>
					<th>Payment Mode:</th>
					<td></td>
				</tr>
				<tr>
					<th>City:</th>
					<td><?php echo $form->textField($model,'city',array('size'=>30,'maxlength'=>60)); ?></td>
					<td><?php echo $form->error($model,'city'); ?></td>
				</tr>
				<tr>
					<th>State:</th>
					<td><?php echo $form->textField($model,'state',array('size'=>30,'maxlength'=>60)); ?></td>
					<td><?php echo $form->error($model,'state'); ?></td>
				</tr>
				<tr>
					<th>Country:</th>
					<td><?php echo $form->textField($model,'country',array('size'=>30,'maxlength'=>60)); ?></td>
					<td><?php echo $form->error($model,'country'); ?></td>
				</tr>
				<tr>
					<th>Mail Address:</th>
					<td><?php echo $form->textField($model,'address',array('size'=>60,'maxlength'=>60)); ?></td>
					<td><?php echo $form->error($model,'address'); ?></td>
					
				</tr>
			<?php endif ?>
				<tr>
					<th></th>
					<td><input type="submit" value="&nbsp;Save&nbsp; " /></td>
					<td></td>
				</tr>
			</tbody>
		</table>
		<?php $this->endWidget(); ?>
	</div>
</div>